专利摘要:
The invention relates to a method and apparatus for identifying a two-dimensional dot code in digital image data of the dot code, the dot code comprising first and second type elements arranged in an ordered grid and having a contour having an L-shaped solid line (11 ') without transitions between the first and second type elements, the method comprising: calculating a gradient field from the digital image data; Calculating magnitude order data of the gradient; Performing a threshold operation; Detecting linear segments (111 ', 112') in the image data thus obtained; Identifying pairs of the detected linear segments based on an angle criterion and a distance criterion and sampling partial digital image data corresponding to a rectangular area in the digital image data, and detecting presence of first and second type elements in partial digital image data, the rectangular area is defined by one of the identified pairs of detected linear segments.
公开号:CH708994B1
申请号:CH00512/15
申请日:2013-04-30
公开日:2017-01-13
发明作者:Aspert François;Bégard Julien;Leroux David
申请人:Sicpa Holding Sa;
IPC主号:
专利说明:

Technical area
The present invention relates to identifying a two-dimensional point code (barcode). More particularly, the present invention relates to a method for identifying a two-dimensional point code in digital image data of the point code, a device configured to identify a two-dimensional point code, in particular, portable devices and fixed modular devices. The present invention also relates to a corresponding computer-readable medium.
background
Nowadays, one-dimensional and two-dimensional point codes are omnipresent in the form of so-called "labels". In particular, such point codes are found on consumer goods, electronic and non-electronic devices, machines, vehicles, and also on documents such as tickets, papers, banknotes, etc. In addition to the one-dimensional point code, the two-dimensional point code has gained importance in recent years. While the one-dimensional point code is classically limited to coding information in only a linear dimension, the two-dimensional point code, which comprises elements arranged in an ordered grid of at least a first and second type, allows a significant increase in the amount of data that can be encoded.
Figs. 1A and 1B are schematic views of conventional two-dimensional dot codes which encode information by arranging elements of at least first and second types such as rectangles, dots, triangles and the like for encoding information. At least two distinguishable types of elements are used to store information in the form of binary units, i. Bits, to encode. For example, a white-printed square may represent the information "0" as an element of a first type, while a black-printed square as an element of a second type represents the information "1".
Fig. 1A is a schematic view of a two-dimensional dot code according to GS1 (Trade Mark) DataMatrix ECC 200 Standard (GS1 being an international association providing standards for two-dimensional point codes). This two-dimensional point code comprises two main areas, namely the so-called "finder pattern" 10 and the data 20. The latter data 20 carry the actual payload data of the point code and comprise elements of a first and second type, 21, 22, which are arranged in an ordered grid. The finder pattern 10 also consists of the elements of the first and second types and is in turn in the so-called "L-finder pattern" 11 (also referred to as L-shaped solid line, L-line, solid line, etc.) and the so-called "clock track" 12 (also referred to as a clock line, L-shaped clock line, etc.) divided.
According to a convention, the tact line 12 is formed by linearly alternating the arrangement of the first and second type elements 21, 22. Therefore, the clock line 12 provides transitions between the first and second type elements 21, 22, while the solid line 11 does not. Both segments (or legs) of both the continuous line 11 and the tact line 12 intersect each other at a corner substantially at a right angle. Thus, a rectangular-shaped contour of the two-dimensional dot code is formed by the solid line 11 and the clock line 12.
According to another convention, the intersecting element (intersection element) of the two segments of the timing line 12 is of a predetermined type, either the first type 21 or the second type 22. In particular, an actual convention defines this intersection element 13 as a light element, for example in the context of the present disclosure, an element of the first type, in contrast to dark elements, for example in connection with the present disclosure, a second type element.
While FIG. 1A shows a quadratic version of the dot code of DataMatrix 1, the current conventions are not limited to square point codes, and FIG. 1B shows an example of a rectangular implementation 1. The two-dimensional point code is again delimited by a contour comprising an L-shaped solid line 11 and an L-shaped clock line 12. However, since the general contour is not limited to squares, one segment 111 of the solid line 11 may be shorter than the other segment 112 of the solid line 11. Accordingly, one segment 121 of the clock line 12 may be shorter than the other segment 122.
In general, the elements of the first and second types 21, 22 may take any distinguishable form. This aspect is illustrated in FIG. 2A, which shows the first-type element 21 as a general right-hatched square / rectangle and the second-type element as a general left-hatched square / rectangle 22. This generalization stems from the fact that a two-dimensional dot code is not necessarily printed on white paper using, for example, a black dye. Rather, the two-dimensional point code can also with the help of colored dyes or inks; Thermal printing on heat-sensitive paper; mechanical means, such as milling, embossing, grinding, etc .; or physical / chemical agents, such as laser etching, acid etch, etc. Any type of implementation is possible, as long as the elements can be distinguished in their corresponding manner, for example in digital image data obtained from the two-dimensional point code. For example, a digital camera may obtain digital image data of a two-dimensional dot code printed on a paper document or laser etched on a metal can.
In addition, the various printing techniques can also lead to different "qualities" of a two-dimensional point code. Apart from the more or less optimal representation (as shown for example in FIGS. 1A and 1B), implementations with individual elements such as those shown in connection with FIG. 2B are also possible. In this case, even the solid line 11 between two adjacent elements of the same kind 22 interruptions. However, the average width of such breaks may still ensure the characteristics of no element type transition between adjacent elements, as shown at reference numeral 28. On the other hand, a transition between the element type by means of the characteristic width of the interruption, as shown by reference numeral 29, can be further identified.
Fig. 2C shows a somewhat opposite situation in which even diagonally adjacent elements merge. However, in this case too, it is assumed that the elements of the first and second types can be distinguished and that their corresponding assignment to positions in an ordered grid is still possible.
The decoding of a two-dimensional dot code usually begins with the acquisition of a photographic image of the two-dimensional dot code on a particular object, such as a consumer item or a document. This image is then obtained in the form of digital image data defining corresponding pixel values for the pixels of the image. These digital image files are then subjected to image processing by means of a processing unit (e.g., CPU, computer, server, embedded system, ASIC, etc.). Such processing can be divided into several individual steps to ultimately decode the data encoded in the two-dimensional point code.
Since the taking of the two-dimensional dot code is usually recorded with an arbitrary perspective, it means that the exact distance, angle, and general orientation of the pickup device (e.g., a CCD camera) in relation to the two-dimensional dot code is unknown. Therefore, it may be necessary to first identify the shot or area of the two-dimensional dot code within the given digital image data. Once the two-dimensional dot code in the digital image data has been identified, processing can continue to identify and decode the individual elements of the dot code data.
Furthermore, the overall picture quality of the input picture may be low, and usually only a single picture is taken so that one has to work with the available low quality input. The reason for the low image quality is that the time available to capture the image is short and the image has to be taken in situations where the object / document, and hence the two-dimensional dot code, is moving at a considerable speed. For example, a two-dimensional dot code may be applied to an item in a production line (eg, a soda can in a fill line) so that many items pass a point of observation at high speed, and possibly without a hold that can be used to take a picture. Specifically, it may be the case that in fact only a few milliseconds are available to capture the image.
In addition, the image may include other features that may be of a similar aspect to a two-dimensional point code. Referring again to the example of beverage cans, such cans usually carry graphic elements (e.g., manufacturer's logo, symbols, photo, etc.), text, and even other point codes (e.g., EAN). Consequently, not only must the two-dimensional point code be quickly identified from low-quality input image data, but a decision must also be made as to which features actually correspond to the two-dimensional point code.
Generally, the initial steps of image processing include identifying the two-dimensional dot code in the input image data, i. a determination of which parts of the input image data comprise the target data to be decoded and which other parts correspond to "non-interesting" features that do not need to be further processed.
In conventional concepts, a sequence of different processing stages is contemplated, which, however, may be too slow to meet the requirements for fast decoding / identification. Further, in the conventional concepts, the fact may possibly not be properly considered that the quality of input image data is low and / or that the input image data includes other features that may be misinterpreted as two-dimensional point code.
Therefore, there is a need for improved time efficiency and robustness of existing identification and decoding schemes so that the total time required from capturing an image from two-dimensional point codes to finally obtaining the decoded payload data of the two-dimensional point code can be minimized and thus reliable identification of the actual two-dimensional dot code can be made even if the input image data includes features similar in appearance to a two-dimensional dot code.
Summary
The above-mentioned objects and problems are solved by the subject-matter of the independent claims. Further preferred embodiments are defined in the dependent claims.
According to one aspect of the present invention, a two-dimensional point code is identified in digital image data of the point code, the point code comprising first and second type elements arranged in an ordered grid and having a contour having an L-shaped continuous line without Transitions between elements of first and second type, the method comprising: calculating a gradient field from the digital image data, the gradient field specifying a gradient of the pixel value in the digital image data; Calculating magnitude order data of the gradient from the gradient field; Performing a threshold operation on the basis of the calculated magnitude order data of the gradient and obtaining edge segment image data; Detecting linear segments in the edge segment image data; Identifying pairs of the detected linear segments based on an angle criterion between two of the detected linear segments and based on a distance criterion that considers a distance between a limb of each of the two linear segments; and scanning partial digital image data corresponding to a rectangular area in the digital image data, and detecting presence of first and second type elements in partial digital image data, wherein the rectangular area is defined by one of the identified pairs of detected linear segments.
In other aspects, a related device and related computer-readable medium is provided.
Brief description of the drawings
Embodiments of the present invention, which are presented for a better understanding of the concepts of the invention and do not limit the invention, will now be described with reference to the figures, in which:<Tb> FIG. 1A and 1B show schematic views of a square and rectangular implementation of a two-dimensional point code as one possible input for embodiments of the present invention;<Tb> FIG. 2A <SEP> is a schematic view of a general implementation of a two-dimensional point code as a possible input for embodiments of the present invention;<Tb> FIG. 2B and 2C <SEP> show schematic views of another implementation of a two-dimensional point code as a possible input for embodiments of the present invention;<Tb> FIG. 3 shows a flowchart of a two-dimensional point code decoding process in which embodiments of the present invention may be employed;<Tb> FIG. 4A to 4J <SEP> are additional schematic views accompanying the description of the decoding process described in connection with Fig. 3;<Tb> FIG. 5A and 5B <SEP> show flowcharts of process details according to embodiments of the present invention;<Tb> FIG. FIGS. 6A and 6B show flowcharts of process details according to embodiments of the present invention; and<Tb> FIG. Figures 7A to 7C show schematic views of embodiments of devices of the present invention.
Detailed description
FIG. 3 shows a flowchart of a possible decoding process that includes identifying and decoding a two-dimensional point code. This process begins with a raw image capture of the two-dimensional dot code that may be attached to an item or document. The recording is obtained in the form of digital image data from the two-dimensional dot code, for example, by conventional digital cameras, video cameras, CCD cameras, scanners, and the like.
In a first step S1 (= THRESHOLD PROCEDURE), the digital raw input files are subjected to a threshold value operation for the purpose of binarizing the input recording. In general, the thresholding method involves marking individual pixels of the digital image files with respect to their pixel value. In the simplest form of the thresholding method, the pixel value of each pixel is compared to a threshold, e.g. each pixel having a value equal to or above this threshold is assigned to a first group, while all pixels having a value below the threshold are assigned to a second group. In this way, a binarized image is obtained which comprises only pixels of a first and second group. The purpose of the threshold method is to provide a means to distinguish objects (of possible interest) from the background in the digital image data. Fig. 4A shows such a binarized recording according to the thresholding method in which the two groups are represented by the colors black and white. The image shows a number of features, one of which is already a good candidate for a two-dimensional point code.
In optional step S2 (= REDUCED), the data obtained from the threshold process may be rescaled to downscale the shot by a given factor. This can then significantly speed up the approximate location of the dot code in the digital image data. As long as no important features are lost through resizing, it is obvious that reducing the data to speed up any subsequent scan can significantly contribute. As shown in Figure 4B, scaling down by a fixed factor of 16 reduces the width and height of the resized mount by a factor of four.
In step S3 (= EXPANSION), the image data subjected to the threshold process or the threshold process and the re-sizing are subjected to an expansion and hole filling process. This step accordingly includes fusing and filling adjacent pixels of a given value, e.g. black pixels until the number of blocks in the shot is constant. In other words, the expansion and filling steps can be repeated until the number of blocks remains constant. Fig. 4C shows the process of expansion (left) and hole filling (right).
In this step, the digital image data may nevertheless comprise more than one form, which may be interpreted as a possible candidate of the two-dimensional point code. Therefore, in a subsequent step S4 (= CLICK DETECT), detection of blobs is performed to filter the shapes. This can include finding and numbering all shapes in the shot and deleting all shapes with a small area so that small objects and noise are removed. It may then be considered to retain the largest form, which is then believed to be the best candidate for the two-dimensional point code within the image data. The result of this process will be shown in connection with FIG. 4D.
In a subsequent step S5 (= EROSION) erosion is performed on the data obtained after step S4 to restore the original contours of the recording. For this purpose, it may be considered to apply the same number of erosion steps as the number of steps applied during the previous expansion (see step S3). The result on the processed image data is shown in connection with FIG. 4E, in which a detail view of the erosion is also shown (left).
In a subsequent step S6 (= RAISING THE LIMITS) the boundaries of the two-dimensional point code are highlighted. This may include applying a filter to the image data that detects the variation in pixel intensity. In general, a conventional edge detection algorithm can be used. The resulting effect on the processed image data is again shown in connection with FIG. 4F.
In a subsequent step S7 (= LIMITS) the boundary equations are calculated. This can be achieved, for example, by conventional means, such as the detection of parametric objects (lines, circles, etc., by means of the so-called Hough transformation). This involves transforming data in a Cartesian coordinate system (x, y) into a polar coordinate system (R, θ), i. from y = ax + b to R = x cos (θ) + y sin (θ). Here, R is the distance to the origin, while θ is the edge angle of the gradient recording. Then, an accumulator array is incremented from these values and final lines are obtained from the four best values in the accumulator. The result of this process is again shown in connection with FIG. 4G.
In the following step S8 (= CORNER EXTRACTION), the corners can be extracted. Since the intersections of the Hough lines are only approximate vertices of the two-dimensional point code, better and more accurate coordinates must be calculated. This can be accomplished by scanning line by line (or column by column) in a small area around the approximate corners until a black pixel is reached. The approximate corners can be determined by cutting the lines of the boundary as calculated in step S7. The coordinates of the detected black pixel can then be used as a better approximation to the coordinates of the corner. A small area of interest (located in the original image) can be used to ensure the highest precision and a fast process. This corresponding concept is in turn explained in more detail in connection with FIG. 4H.
In a subsequent step S9 (= IDENTIFY LINES), the parameters of the two-dimensional point code are identified. This may apply, in particular, to the identification of the L-shaped solid line and the L-shaped clock line of a DataMatrix point code, as described in connection with FIGS. 1A and 1B. This may include counting the number of black pixels along each segment to obtain a so-called score. The scanned segment that has received the highest score is identified as the longest segment of the L-shaped solid line, the scanned segment that has received the second highest score and is substantially perpendicular to the identified longest segment of the L-shaped solid line, is identified as the second longest segment of the L-shaped solid line (the angle being calculated from the equations of the boundary line obtained in step S7). The two remaining segments form the L-shaped clock line. Scanning within actual image data is shown in connection with FIG. 4I.
If an optional resizing has been performed in step S2, the size of the two-dimensional dot code and the original grid position are restored in a subsequent step S10 (= RESIZING). This may include scanning the timing line boundaries identified in step S9 and counting the number of transitions so as to determine the size of the grid. This may also include verifying the transient redistribution in space. Optionally, the results may be validated by comparing the transition count with a normalized size of a two-dimensional point code, e.g. 16 x 16, 12 x 26 etc. It is still possible to let the application calculate the size or to force a desired fixed value. This aspect is described in more detail in connection with FIG. 4J.
In a next step S11 (= BUTTON / DECODE) scanning and decoding is performed taking into account that the original grid position may not be perfect in terms of the scan quality, the original grid position being calculated from the coordinates of the vertices obtained in step S8 and the size of the grating calculated in step S10 or, in the case where no size restoration was made in step S10, a quantity obtained directly by counting the transitions of the L-shaped clock line of the two remaining segments as found in step S9, is obtained. This, in turn, may also include verifying the transient redistribution in space or optionally validating the results as described for step S10. For this reason, a heuristic search pattern for minimizing the number of error correction codewords can be used in the Reed-Solomon algorithm. The grid may be moved along the search path until sufficient quality is achieved and, if a suitable position is found, scanning is performed. If the two-dimensional point code or the image thereof is distorted (e.g., due to printing and / or acquisition), a 3x3 affine transformation matrix can be calculated. This maps an ideal two-dimensional point code grid onto the actual grid. This transformation can help to precisely restore the real coordinates of any elements in the ideal lattice while correcting a number of defects.
In general, steps S2 to S9 are for restoring the contour of the two-dimensional dot code, i. the segments of the contour and the beginning and the end (extremities) of each segment, aligned. Two of the segments (a pair of opposing segments) are usually parallel to each other and form the contour with a typical aspect ratio and size. In other words, the steps detect an object within the shot with a global shape that is similar to a two-dimensional point code of a particular type and standard (e.g., DataMatrix); the similarities being based on the detection of four edges forming approximately one parallelogram.
Fig. 5A shows a flowchart of one embodiment of a method of the present invention. In particular, this embodiment relates to the method which has already been introduced above in connection with FIGS. 3 and 4A. Steps S101 to S105, as now explained in connection with FIG. 5A, replace all steps S1 to S8 explained in connection with FIG.
This embodiment of a method equally relates to identifying a two-dimensional dot code in digital image data of the dot code. Thus, again, it is assumed that a pick-up of the dot code, which was probably already attached to an object, document or product, was obtained. The digital image data will thus also contain parts that show that item, document or product along with parts of the background or items belonging to, for example, an operator's equipment or an assembly line. In this embodiment, it is also assumed that the point code comprises elements of a first and a second type arranged in an ordered grid and that the point code has a contour which has an L-shaped continuous line without transitions between the elements first and second Type includes.
According to this embodiment, in a first step S101 (= CALCULATION OF THE GRADIENT), a gradient field is calculated from the digital image data, the gradient field specifying a gradient of the pixel value in the digital image data. Then, the magnitude order data of the gradient is calculated from the gradient field to obtain a scalar value for each pixel representing the order of magnitude of the gradient. This calculation of the gradient may in turn include some preparatory processing, depending on the state and resolution (size) of the digital input image data. These steps are shown in conjunction with FIG. 5B.
If necessary, the size of the raw input image is changed in an optional step S111 (= SIZE CHANGE / REDUCTION), for example by rescaling via bilinear sub-sampling. Similar aspects may apply as previously described in connection with FIG. 4B. Then the resized image can be smoothed using a Gaussian filter in a step S112 (= SMOOTHING), for example by a blur step with a fixed zoom factor. A typical value of the zoom factor may be determined on the basis of the known spot size, the dots being enlarged to the point where adjacent dots tend to touch and form a line. Subsequently, in step S113 (= CONTRAST LEAD DETECTION), detection of contrast levels on the smoothed shot is performed. Here, a Sobel operator can compute a two-dimensional spatial gradient from the image data. In step S114 (= APPROXIMATE GRADIENT), an approximate magnitude of the gradient is calculated, which implies that an edge strength is approximately calculated for each image pixel. Then, in step S115 (= NOT SUPREME SUPPRESSION), a non-peak suppression operation is performed on the order of the gradients, that is, the shot is scanned along the direction of the image gradient, and if pixels are not part of the local maximum values be set to zero with the effect that all image information that is not part of the local maximums is suppressed. This process allows the elimination of poor contrasts, noise, background, etc. Thus, it can be assumed that only the remaining features correspond to the two-dimensional dot code. This may include the assumption that the ink response to illumination when making the raw shot should be the highest, especially in comparison with the background response.
Referring again to Fig. 5A, the process proceeds to step S102 (= THRESHOLD) based on the obtained gradient field. More specifically, according to this embodiment, in step S12, a threshold operation is performed based on the calculated magnitude data of the gradient, and image data of the edge segments are obtained. The thresholding process may include separation of light and dark areas based on the magnitude of the gradients. This may provide the advantage that the dynamics of the pixel values are greater, in that the range of values to be scanned is very large in comparison with the values of the image pixels themselves (e.g., dynamics are limited to only 256 values). The Otsu method of forming clusters can be used to obtain better visibility of the variations so that a gradient threshold allows better separation of the background information from the information representing the two-dimensional point code in the digital image data. Finally, if necessary, a resizing operation can be performed to restore the original scale. For this purpose, inverse rescaling can be applied by bilinear resampling without eliminating the effects of the blur step. In this way, a binarized picture with only a few enlarged dots and segments can be obtained. Thus, segments can be detected.
If an optional rescaling has been performed in step S111, then in a subsequent step S103 (= RESET SIZE), the size of the two-dimensional dot code and the original grid position are restored. In general, the steps of S10 as described in connection with FIG. 3 may also be applied here.
The process then proceeds to step S104 (= DETECT LINEAR SEGMENTS) based on the obtained thresholded image data. More specifically, according to this embodiment, in step S104, detection of linear segments in the image data of the edge segment is performed. For this purpose, an edge following algorithm may be used to detect the beginning and the end of each segment in the binarized image derived from the edge detection step, and the adjacent segments, for example, based on distance and angle using the so-called LSD algorithm or a Hough transform to rate. The earlier LSD algorithm is described and published in: R.G. v. Gioi, J. Jakubowicz, J.-M. Morel and G. Randall, "LSD: A Line Segment Detector" (in Image Processing On Line (2012); http: // dx. Doi. Org / 10. 5201 / ipol. 2012.gjmr-lsd).Optionally, merging of two collinear segments may be considered to iteratively form longer segments from a list of segments.
Based on the detected segments, in step S105 (= IDENTIFY PAIRS) pairs of detected linear segments are identified based on at least one angle criterion between two of the detected linear segments. Likewise, a (second) distance criterion can be used, which considers the distance between the nearest extremities of the segments obtained with the aid of the application of the (first) angle criterion. The distance can be compared with a predetermined threshold with respect to falling below it (ideally, the distance for an ideal vertex of an L-shape disappears). In other words, a candidate for segment pairs is searched for a "best L". For this purpose, the angle criterion may only consider approximately rectangular segments most likely to represent the L-shaped solid line or the "finder pattern" forming the L boundary of a two-dimensional dot code of DataMatrix. As a basis, the previously found segments can be consulted by identifying those that are good candidates for forming the L-shape. For example, in a standard orientation, the corner on the lower left side of a DataMatrix point code is the starting point for a short segment corresponding to the height and for a long segment corresponding to the length of the point code (see Fig. 1B).
The "best L" is then completed to a square, rectangle, parallelogram, or, generally, rectangle, square, or quadrilateral polygon, to obtain all four approximate corners on which subsequent steps can build. In particular, within the aforementioned LSD algorithm, each L-shape may define a rectangle by mirroring the L-shape and completing the two L-shapes into a rectangle. Alternatively, according to the Hough transform, the rectangle or polygon is completed by the L-shaped solid line and the clock line.
Fig. 6A shows a flowchart of an alternative embodiment of a method. In particular, this embodiment relates to the method already introduced above in connection with FIG. 3 and FIG. 4A. The steps S21 to S25, as will now be explained in connection with FIG. 6A, replace the step S9 explained in connection with FIG. Similarly, steps S21 to S25 may also follow step 105 as explained in connection with FIG. 5A.
This embodiment of the method also relates to identifying a two-dimensional dot code in digital image data of the dot code. The dot code includes first and second type elements arranged in an ordered grid, and the dot code has a contour including an L-shaped clock line with transitions between the first and second type elements and an L-shaped solid line without transitions between the first and second type elements. Approximate vertices in the digital image data determine first and second pairs of opposing edge segments along the contour. In other words, this embodiment assumes that, for example, the timing line segment 122 as shown in Fig. 1B and the corresponding segment of the solid line 112 appear as a pair of opposite edge segments in the digital image data, while the segments 111 and 121 as a another pair of opposite edge segments appear.
This embodiment takes into account that the approximate corners and thus the segment pairs (i.e., lines) in the digital shot data are known, for example, by the processes described in connection with Fig. 3 or 5A. In a first step S21 (= FIRST PART OF THE FIRST PAIR) a first edge segment of the first pair in the digital image data is scanned and transitions between the elements of the first and second types along the first edge segment of the first pair are counted. Scanning and counting can be done as separate processes or simultaneously. As such, scanning itself may refer to the process of scanning along a line within digital image data to determine a (pixel) value at a position along the line (see also Figs. 4I and 4J).
In optional step S22 (= SECOND SEGMENT OF FIRST COUPLE), if no transitions were counted along the first edge segment of the first pair (ie, in step S21), the second edge segment of the first pair in the digital image data is scanned and the transitions between the first and second type elements along the second edge segment of the first pair. If transitions have already been counted in step S21, it can be determined that the scanned first segment of the first pair is a segment / leg of the L-shaped clock line. The scanning and counting with respect to the second segment of the first pair can thus be omitted since it can be assumed that the length is the same as that of the first segment and- because the two-dimensional point code follows the conventions- The second segment will have no transitions to be counted.
Also, in step S23 (= FIRST SEGMENT OF SECOND PAIR), the process continues by scanning a first edge segment of the second pair in the digital image data and counting transitions between elements of the first and second types along the first edge segment of the first pair second couple. Again, in optional step S24 (= SECOND SECTION OF SECOND PAIR), the second edge segment of the second pair is scanned in the digital image data and transitions between first and second type elements are counted along the second edge segment of the second pair, if along the first edge segment of the second pair no transitions were counted. The optional character of step S24 again becomes clear, for example, from Figs. 1A and 1B, in the same manner as for the optional step S22.
Then, the process in step S25 (= IDENTIFYING CONTINUOUS LINE AND CLOCK LINE) may be identified as the L-shaped clock line of the dot code and the edge segment of the first pair and the edge segment of the second pair along which transitions have been counted Identifying the edge segment of the first pair and the edge segment of the second pair along which no transitions have been counted as the L-shaped solid line of the point code is continued. Using the transient counts of both segments with transitions, the orientation and the longer and shorter sides of the two-dimensional point code can be determined. The number of transitions can also pave the way for defining the ordered lattice to decode the point code.
The advantage over conventional processing becomes apparent when considering the typical method of scanning the pixels of all edges of the candidate rectangle to detect transitions or no transitions. In the latter case, a segment of the solid line was scanned, otherwise a segment of the line was scanned. In addition, each scanned pixel / element is counted to detect both the long and short segments. In total, eight counts / scans are required, i. two for each of the four segments that make up the contour.
However, according to this embodiment, the scan / count operations can be reduced to four, three, or even two. Therefore, in any case, a substantial improvement in efficiency over the conventional methods is obtained. This is due to the fact that scanning and counting can be done simultaneously. For this reason, even if all four segments are scanned and counted simultaneously, since, for example, both first segments of both pairs have no transitions, the number of required operations is halved. In addition, only a first segment of a first pair of opposing sides is scanned to detect the presence of transitions, rather than successively viewing the segments around the rectangle, and only the transitions must be counted to determine the long and short part of the timing line , If no transition is detected, then the scanned edge corresponds to one edge of the L-shaped solid line; if at least one transition is detected, then the scanned edge may be considered as corresponding to an edge of the timing line.
Fig. 6B shows a flowchart of another embodiment of a method. In particular, this embodiment relates to the method already described above in connection with FIGS. 3 and 4A. Steps S31 to S35, as now explained in connection with FIG. 6B, replace step S9, as explained in connection with FIG. Similarly, steps S31 through S35 may follow step 105 as explained in connection with FIG. 5A.
The embodiment of the method equally relates to identifying a two-dimensional dot code in digital image data of the dot code. The dot code includes first and second type elements arranged in an ordered grid, and the dot code has a contour including an L-shaped clock line with transitions between first and second type elements and an L-shaped solid line with no transitions between Elements of the first and second kind includes. Approximate vertices in turn determine in the digital image data a first and a second pair of opposite edge segments along the contour. In addition, the two-dimensional point code of the convention follows that a crossing element at the corner of the L-shaped clock line is of a predetermined / known type selected from the first and second types.
This embodiment enables a further improvement in efficiency by scanning a first edge segment of the first pair in the digital image data and transitions between elements of the first and second types along the first one in a first step S31 (= FIRST PART OF THE FIRST PAIR) Edge segment of the first pair are counted. Again, if no transitions were counted along the first edge segment of the first pair, then scanning the second edge segment of the first pair in the digital image files and counting the transitions between first and second type elements along the second edge segment of the first pair (see optional step S32 = SECOND SEGMENT OF THE FIRST COUPLE).
Due to the known (predetermined) nature of the crossing element (see element 13 in Fig. 1A), it can be determined in step S33 (= DETERMINING THE EXTREMITIES) which extremity of the edge segment of the first pair along which transitions were counted, the crossing element equivalent. Thus, the process in step S34 (= SEPARATION OF SECOND PAIR) can be performed directly with the scanning of the edge segment of the second pair having the crossing element and the counting of the transitions between the first and second type elements along the edge segment of the second pair forming the Comprises crossing element, and in step S35 (= IDENTIFYING THE PASSING LINE AND TACTILE LINE) identifying the edge segment of the first pair and the edge segment of the second pair intersecting each other at the crossing element as the L-shaped clock line of the point code and identifying the Edge segment of the first pair and the edge segment of the second pair, which are not part of the L-shaped clock line, as the L-shaped solid line of the point code are continued. Thus, in this embodiment, only three or two operations are necessary due to the determination of the extremity as in step S33.
Fig. 7A shows a general embodiment of a device. In particular, a device 100 is shown that comprises a processing unit 110 and a storage unit 120. The memory unit 120 may store a code that, when executed on the processing unit 110, implements one or more embodiments of methods of the present invention.
Optionally, the apparatus 100 may include an image capture unit 131 to capture a digital image of a two-dimensional dot code, such as is applied to an article or document. In addition, the device 100 may include a communication unit 132 for communicating an identification and / or a decoding result to other locations, such as servers, controllers, and the like. The communication may be over a network, such as a local area network (LAN), wireless network (WLAN), the Internet, and the like. In addition, bus systems, such as CAN, can also be used for data exchange.
Figure 7B shows a schematic view of a portable embodiment of a device for capturing a capture of the two-dimensional point code and for identifying and (optionally) decoding it. The device 200 includes a window 201 through which a digital photograph of an article 210 may be generated. A two-dimensional dot code 1 is applied to the article 210 by any of the aforementioned printing, mechanical, physical or chemical methods. The device 200 may further include an integrated processing unit (not shown) to perform one or more methods in accordance with embodiments of the present invention. An additional operating element 202 may be provided to turn the device 200 on and off and / or capture an image, acquire / obtain corresponding digital image data, and / or process the digital image data for identification and / or decoding of the two-dimensional point code 1 on the article 210 to initiate. Of course, the device may take other forms and may be wired or wireless.
Fig. 7C shows a schematic view of a fixed embodiment of an apparatus for capturing a capture of the two-dimensional point code and for identifying and (optionally) decoding it. For example, a module that can be mounted on a manufacturing / distribution line to identify two-dimensional point codes on items being transported on the line. The device 200 in turn comprises a window 201, by means of which a digital image of an object 210 having a two-dimensional point code 1 can be generated. The device 200 may further include an integrated processing unit (not shown) to perform one or more methods in accordance with embodiments of the present invention. An additional fixation element 202 may be provided to attach the device 200, for example, to a production line on which a plurality of articles 210 pass through the device 200 for identification. Of course, the device may take other forms and may be wired or wireless.
According to a further embodiment, a method is provided for identifying a two-dimensional point code in digital image data of the point code, the point code comprising first and second type elements arranged in an ordered grid and having a contour comprising a L-shaped continuous line without transitions between elements of the first and second type comprises. The method includes a computing unit that performs a calculation of a gradient field from the digital image data, wherein the gradient field specifies a gradient of the pixel value in the digital image data; a unit that performs a calculation of magnitude data of the gradient from the gradient field; a unit that performs a threshold operation on the basis of the calculated magnitude order data of the gradient and obtaining edge segment image data; a detection unit that performs detection of linear segments in the edge segment image data; an identifying unit that performs an identification of pairs of the detected linear segments based on an angle criterion between two of the detected linear segments and based on a distance criterion that considers a distance between a limb of each of the two linear segments; and a scanning unit that performs scanning of partial digital image data corresponding to a rectangular area in the digital image data and detecting presence of first and second type elements in partial digital image data, the rectangular area of one of the identified pairs of detected linear Segments is defined.
Although detailed embodiments have been described, these are merely to provide a better understanding of the invention defined by the independent claims, and are not to be considered as limiting.
权利要求:
Claims (19)
[1]
A method of identifying a two-dimensional dot code in digital image data of the dot code, the dot code comprising first and second type elements arranged in an ordered grid and having a contour defining an L-shaped solid line without transitions between the elements first and second type, the method comprising:Calculating a gradient field from the digital image data, the gradient field specifying a gradient of the pixel value in the digital image data;- calculating magnitude order data of the gradient from the gradient field;Performing a threshold operation on the basis of the calculated magnitude order data of the gradient and obtaining edge segment image data;- Detecting linear segments in the edge segment image data;- identifying pairs of the detected linear segments based on an angle criterion between two of the detected linear segments and based on a distance criterion that considers a distance between a limb of each of the two linear segments; and- scanning partial digital image data corresponding to a rectangular area in the digital image data, and detecting presence of first and second type elements in partial digital image data, the rectangular area being defined by one of the identified pairs of detected linear segments.
[2]
The method of claim 1, wherein detecting linear segments comprises determining the extremities of the segment, the extremities specifying ends of the segment.
[3]
The method of claim 1 or 2, wherein detecting linear segments comprises fusing two or more collinear segments.
[4]
4. The method of claim 1, wherein the angle criterion specifies that the two segments are substantially orthogonal.
[5]
5. The method of claim 1, wherein the distance criterion specifies that the distance between the two extremities is below a predetermined value.
[6]
6. The method of claim 1, wherein the method comprises determining a best candidate from the identified pairs based on one of the following: an angle criterion, a relative length of the two segments, a cross point, and a distance criterion.
[7]
The method of any one of claims 1 to 6, wherein prior to sampling, the method comprises one of the following steps: normalizing, resizing, and rescaling.
[8]
8. The method according to any one of claims 1 to 7, wherein the element of the first kind is a white color element or a light color element or a more light reflecting element than a second type element, and wherein the element of the second kind a Is a black color element, a dark color element, or a less light reflective element than a first type element, and wherein the first type element in the digital image data corresponds to at least one pixel having a pixel value representing a lighter color and the second element Type in the digital image data corresponds to at least one pixel with a pixel value representing a darker color, darker than the lighter color.
[9]
9. The method according to any one of claims 1 to 8, wherein the two-dimensional dot code is printed, milled, etched, embossed or ground.
[10]
10. The method of claim 1, wherein the method further comprises obtaining the digital image data of the two-dimensional dot code.
[11]
11. The method according to any one of claims 1 to 10, wherein the contour comprises an L-shaped clock line with transitions between the elements of the first and second type.
[12]
12. The method of claim 11, wherein a first leg of the L-shaped timing line is longer than a second leg of the L-shaped timing line and wherein the method further comprises determining the longer leg and the shorter leg based on counted transitions along at least one leg L-shaped tact line includes.
[13]
13. The method of claim 11, wherein the method further comprises decoding the two-dimensional point code based on the identified L-shaped clock line and the L-shaped solid line.
[14]
14. An apparatus configured to identify a two-dimensional point code in digital image data of the point code, the point code comprising first and second type elements arranged in an ordered grid and having a contour that is an L-shaped continuous one Line without transitions between the elements of the first and second type, wherein the device comprising a processing unit is configured as follows:To calculate a gradient field from the digital image data, the gradient field specifying a gradient of the pixel value in the digital image data;To calculate magnitude order data of the gradient from the gradient field;To perform a threshold operation on the basis of the calculated magnitude order data of the gradient and to obtain edge segment image data;For detecting linear segments in the edge segment image data;- for identifying pairs of the detected linear segments based on an angle criterion between two of the detected linear segments and based on a distance criterion that considers a distance between a limb of each of the two linear segments; andFor scanning partial digital image data corresponding to a rectangular area in the digital image data, and detecting presence of first and second type elements in partial digital image data, the rectangular area being defined by one of the identified pairs of detected linear segments.
[15]
15. The device of claim 14, wherein the device is configured as a portable device.
[16]
16. The device of claim 14, wherein the device is configured as a module.
[17]
17. Apparatus according to any one of claims 14 to 16, wherein the apparatus further comprises an image capture unit adapted to obtain the digital image data of the dot code.
[18]
18. An apparatus according to any one of claims 14 to 17, wherein the processing unit is further configured to perform a method according to any one of claims 2 to 13.
[19]
A computer-readable medium storing the code instructing a processing unit of a device to operate to carry out a method according to any one of claims 1 to 13.
类似技术:
公开号 | 公开日 | 专利标题
DE19814075B4|2009-12-03|Method of scanning and recognizing multiple photographs and eliminating marginal errors
EP2417561B1|2013-08-14|Two-dimensional code and method
DE10036110B4|2006-06-14|Method for determining the skew angle of a two-dimensional barcode
DE69926205T2|2006-05-24|ARTIFICIAL REMOVAL TECHNOLOGY FOR SLOW CORRECTED IMAGES
DE69835358T2|2007-07-19|Method for correcting the distortion when scanning an optical code
DE102009059264B4|2017-02-23|Method for quickly locating a decipherable pattern
DE19960555B4|2005-05-19|Method for finding and reading a two-dimensional bar code
DE69929572T2|2006-08-10|Method for reading a two-dimensional bar code without clock signal and without edges
DE102007028866B4|2017-06-08|Apparatus for optically reading a graphical symbol constructed from a plurality of optically recognizable information unit sections
DE602004011145T2|2009-01-02|Apparatus and method for reading optical information
CH708994B1|2017-01-13|A method and apparatus for identifying a two-dimensional point code.
DE102007035884B4|2017-08-24|Line noise suppression device, method and program
DE69629930T2|2004-07-22|Method for setting an optical code attached to an object
CH708993B1|2017-06-15|Method and device for identifying a two-dimensional point code.
DE112010001320T5|2012-06-21|Image processing apparatus, image processing method, image processing program and storage medium
DE69925354T2|2006-03-16|Image processing system to reduce vertical patterns on scanned images
DE4035396C2|1993-08-05|
EP1022541A2|2000-07-26|Procedure and device to determine the geometrical form of sheetlike articles or piles thereof
DE69929110T2|2006-08-24|Apparatus and method for generating print data of the two-dimensional code and associated recording media
EP2677458B1|2014-10-15|Optoelectronic device and method for adjusting brightness
DE102012201024B4|2016-09-22|A method of processing an image to clarify text in the image
EP1586070B1|2006-09-06|Method and device for identifying and compensating a perspectivistic deformation
DE19700318A1|1998-07-09|Method for determining the geometry data of scanning templates
EP2831806A1|2015-02-04|Method for detecting a perspectively distorted polygonal structure in an image of an identification document
DE10040614A1|2002-02-28|Method for automatic detection of a directional structure
同族专利:
公开号 | 公开日
US9652652B2|2017-05-16|
WO2014063837A1|2014-05-01|
US20150294129A1|2015-10-15|
BR112013011943B1|2020-12-29|
BR112013011943A2|2016-11-01|
引用文献:
公开号 | 申请日 | 公开日 | 申请人 | 专利标题

US5742041A|1996-05-29|1998-04-21|Intermec Corporation|Method and apparatus for locating and decoding machine-readable symbols, including data matrix symbols|
US6941026B1|2000-06-13|2005-09-06|Cognex Corporation|Method and apparatus using intensity gradients for visual identification of 2D matrix symbols|
US7181066B1|2002-12-26|2007-02-20|Cognex Technology And Investment Corporation|Method for locating bar codes and symbols in an image|
US7311262B2|2004-08-09|2007-12-25|Optoelectronics Co., Ltd.|Method of decoding a symbol with a low contrast|
US7412106B1|2005-06-25|2008-08-12|Cognex Technology And Investment Corporation|Methods for locating and decoding distorted two-dimensional matrix symbols|
US7438231B2|2006-10-05|2008-10-21|Pitney Bowes Inc.|Method for detecting forged barcodes|
CN102708351B|2012-05-24|2014-07-23|江南大学|Method for fast identifying Data Matrix two-dimensional bar code under complicated working condition background|CN104156941B|2014-05-13|2017-09-26|北京致胜宏达科技有限公司|The method and system in geometric profile region on a kind of determination image|
US10331928B2|2015-11-06|2019-06-25|International Business Machines Corporation|Low-computation barcode detector for egocentric product recognition|
CN105975892B|2016-05-04|2019-02-01|上海皇和信息科技有限公司|Color image two dimensional code coding/decoding method|
CN107665324B|2016-07-27|2020-08-28|腾讯科技(深圳)有限公司|Image identification method and terminal|
CN110310279A|2019-07-09|2019-10-08|苏州梦想人软件科技有限公司|Rectangle and curl rectangle corner image-recognizing method|
法律状态:
优先权:
申请号 | 申请日 | 专利标题
EP12189592|2012-10-23|
PCT/EP2013/059035|WO2014063837A1|2012-10-23|2013-04-30|Method and device for identifying a two-dimensional barcode|
[返回顶部]